<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
		<title>title</title>
		<link rel="stylesheet" type="text/css" href="../css/api.css"/>
		<link rel="stylesheet" type="text/css" href="../css/aui.css" />
		<style>
			body {
				background: transparent;
				padding: 0;
				margin: 0 20;
			}
		</style>
	</head>
	<body>
		<div class="aui-searchbar-wrap demo" id="search">
			<div class="aui-searchbar aui-border-radius" tapmode onclick="doSearch()">
				<i class="aui-iconfont aui-icon-search"></i>
				<div class="aui-searchbar-text">
					请输入搜索内容
				</div>
				<div class="aui-searchbar-input">
					<input type="text" placeholder="请输入搜索内容" autocapitalize="off">
				</div>
			</div>
			<div class="aui-searchbar-cancel aui-text-info" tapmode onclick="cancelSearch()">
				取消
			</div>
		</div>
	</body>
	<script type="text/javascript" src="../script/api.js"></script>
	<script type="text/javascript">
		apiready = function() {
		};
		function doSearch() {
			$api.addCls($api.dom(".aui-searchbar-wrap"), "focus");
			$api.dom('.aui-searchbar-input input').focus();
		}

		function cancelSearch() {
			$api.addEvt($api.dom(".aui-searchbar-cancel"), 'click', function() {
				$api.removeCls($api.dom(".aui-searchbar-wrap.focus"), "focus");
			});
		}
	</script>
</html>